package top.huhuiyu.myforum.dao;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import top.huhuiyu.myforum.entity.TbSubject;

/**
 * TbSubject的数据访问接口类
 */
@Mapper
public interface TbSubjectDAO {
  
  /**
   * 保存TbSubject数据
   * 
   * @param tbSubject
   *            实体数据
   * @throws Exception
   */
  public int save(TbSubject tbSubject) throws Exception;
  
  /**
   * 修改TbSubject数据
   * 
   * @param tbSubject
   *            实体数据
   * @throws Exception
   */
  public int update(TbSubject tbSubject) throws Exception;
  
  /**
   * 删除TbSubject数据
   * 
   * @param tbSubject
   *            实体数据
   * @throws Exception
   */
  public int delete(TbSubject tbSubject) throws Exception;
  
  /**
   * 按照主键查询TbSubject数据
   * 
   * @param tbSubject
   *            带主键数据的实体数据
   * @return 主键查询结果，没有值返回null
   * @throws Exception
   */
  public TbSubject queryByKey(TbSubject tbSubject) throws Exception;
  
  /**
   * 查询全部的TbSubject数据
   * 
   * @return 全部的TbSubject数据
   * @throws Exception
   */
  public List<TbSubject> queryAll() throws Exception;
  
  public List<TbSubject> queryAllNoPage() throws Exception;
  
}
